package com.stxx.stiot2.constants;

import com.stxx.stiot2.domain.Terminal;

public class Topics {
    public static String topic(String topic) {
        return topic.replace("{gateway}","+").replace("{terminal}","+");
    }

    public static String topic(String gateway,String terminal,String topic) {
        return topic.replace("{gateway}",gateway).replace("{terminal}",terminal);
    }

    public static class T2p{
        public final static String report = "/iot/{gateway}/{terminal}/report";
    }
    public static class P2t{
        public final static String get_properties = "/iot/{gateway}/{terminal}/properties/get";
        public final static String set_properties = "/iot/{gateway}/{terminal}/properties/set";
    }
}
